#ifndef EDITORCORE_MOVEACTION_H
#define EDITORCORE_MOVEACTION_H

#include "EditorCore/Actions/Action.h"
#include "EditorCore/IEntity.h"

namespace editor_core {

	class MoveAction : public Action
	{
	public:
		MoveAction( IEntity* entity, cmn::Vec2 vector );
		virtual ~MoveAction() {}

		virtual inline ActionType GetType() const { return ActionType::Undoable; }

	protected:
		virtual bool Commit();
		virtual void Recommit();
		virtual void Rollback();

	private:
		IEntity* m_entity;

		cmn::Vec2 m_targetVector;
		cmn::Vec2 m_actualVector;
	};
}

#endif
